<html>
<head>
<title>Compilador PHP</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>

<body>
<hr>
Menu<br>
<a href="/kpsql/lexico">lexico</a><hr><!-- Required CSS --> 
	<link rel="stylesheet" type="text/css" href="/kpsql/media/treeview/assets/skins/sam/treeview.css" />
 
	<!-- Optional CSS for for date editing with Calendar--> 
	<link rel="stylesheet" type="text/css" href="/kpsql/media/calendar/assets/skins/sam/calendar.css" />

	 
	<!-- Dependency source file -->  
	<script type="text/javascript" src="/kpsql/media/yahoo-dom-event/yahoo-dom-event.js"></script>
 
	<!-- Optional dependency source file -->  
	<script type="text/javascript" src="/kpsql/media/animation/animation-min.js"></script>
 
	<!-- Optional dependency source file for date editing with Calendar-->
	<script type="text/javascript" src="/kpsql/media/calendar/calendar-min.js"></script>
  
	<!-- Optional dependency source file to decode contents of yuiConfig markup attribute-->
	<script type="text/javascript" src="/kpsql/media/json/json-min.js"></script>

  
	<!-- TreeView source file -->  
	<script type="text/javascript" src="/kpsql/media/treeview/treeview-min.js"></script>
<script>
//global variable to allow console inspection of tree:
var tree;

//anonymous function wraps the remainder of the logic:
(function() {

	//function to initialize the tree:
    function treeInit() {
        buildRandomTextNodeTree();
    }
    
	//Function  creates the tree and 
	//builds between 3 and 7 children of the root node:
    function buildRandomTextNodeTree() {
	
		//instantiate the tree:
        tree = new YAHOO.widget.TreeView("treeDiv1");

		var COMANDO_1 = new YAHOO.widget.TextNode("COMANDO", tree.getRoot(), true);
			var SELECAO_1 = new YAHOO.widget.TextNode("SELECAO", COMANDO_1, true);
				var terminal = new YAHOO.widget.TextNode("selecao", SELECAO_1, true);
				var terminal = new YAHOO.widget.TextNode("(", SELECAO_1, true);
				var TABELA_1 = new YAHOO.widget.TextNode("TABELA", SELECAO_1, true);
					var ELEMENTO_I_1 = new YAHOO.widget.TextNode("ELEMENTO_I", TABELA_1, true);
						var terminal = new YAHOO.widget.TextNode("identificador", ELEMENTO_I_1, true);	
					var TABELA1_1 = new YAHOO.widget.TextNode("TABELA1", TABELA_1, true);
						var terminal = new YAHOO.widget.TextNode("epsilon", TABELA1_1, true);
				var terminal = new YAHOO.widget.TextNode(")", SELECAO_1, true);
				var terminal = new YAHOO.widget.TextNode("(", SELECAO_1, true);
				var CRITERIOS_1 = new YAHOO.widget.TextNode("CRITERIOS", SELECAO_1, true);
					var CRITERIO_1 = new YAHOO.widget.TextNode("CRITERIO", CRITERIOS_1, true);
						var TABELA_2 = new YAHOO.widget.TextNode("TABELA", CRITERIO_1, true);
							var ELEMENTO_I_2 = new YAHOO.widget.TextNode("ELEMENTO_I", TABELA_2, true);
								var terminal = new YAHOO.widget.TextNode("identificador", ELEMENTO_I_2, true);
							var TABELA1_2 = new YAHOO.widget.TextNode("TABELA1", TABELA_2, true);
								var terminal = new YAHOO.widget.TextNode("epsilon", TABELA1_2, true);
						var terminal = new YAHOO.widget.TextNode("comparacao", CRITERIO_1, true);
						var CRITERIO1_1 = new YAHOO.widget.TextNode("CRITERIO1", CRITERIO_1, true);
							var ELEMENTO_S_1 = new YAHOO.widget.TextNode("ELEMENTO_S", CRITERIO1_1, true);
								var terminal = new YAHOO.widget.TextNode("string", ELEMENTO_S_1, true);
					var CRITERIOS1_1 = new YAHOO.widget.TextNode("CRITERIOS1", CRITERIOS_1, true);
						var terminal = new YAHOO.widget.TextNode("epsilon", CRITERIOS1_1, true);
				var terminal = new YAHOO.widget.TextNode(")", SELECAO_1, true);



				
        //for (var i = 0; i < Math.floor((Math.random()*4) + 3); i++) {
            //var tmpNode = new YAHOO.widget.TextNode("label-" + i, tree.getRoot(), false);
            // tmpNode.collapse();
            // tmpNode.expand();
            // buildRandomTextBranch(tmpNode);
            //buildLargeBranch(tmpNode);
        //}

       // Expand and collapse happen prior to the actual expand/collapse,
       // and can be used to cancel the operation
       tree.subscribe("expand", function(node) {
              YAHOO.log(node.index + " was expanded", "info", "example");
              // return false; // return false to cancel the expand
           });

       tree.subscribe("collapse", function(node) {
              YAHOO.log(node.index + " was collapsed", "info", "example");
           });

       // Trees with TextNodes will fire an event for when the label is clicked:
       tree.subscribe("labelClick", function(node) {
              YAHOO.log(node.index + " label was clicked", "info", "example");
           });

		//The tree is not created in the DOM until this method is called:
        tree.draw();
    }

	//function builds 10 children for the node you pass in:
	/*
    function buildLargeBranch(node) {
        if (node.depth < 10) {
            YAHOO.log("buildRandomTextBranch: " + node.index, "info", "example");
            for ( var i = 0; i < 10; i++ ) {
                new YAHOO.widget.TextNode(node.label + "-" + i, node, false);
            }
        }
    }*/

	//Add a window onload handler to build the tree when the load
	//event fires.
    YAHOO.util.Event.addListener(window, "load", treeInit);

})();
</script>



<h1>Lexemas</h1>
<hr>
<table border="0">
	<tr>
		<td valign="top">

<form action="/kpsql/lexico/analize" method="post">
<label for="relacional" >Codigo</label><br><textarea id="relacional" name="relacional" cols=80 rows=4>selecao (aluno) (nome=&quot;marcio&quot; and idade=15)</textarea><br><input type="submit" id="enviar" name="enviar" value="Analizar"  /></form>
		</td>
		<td>
		<div id="treeDiv1">
		
		</div>
		</td>
	</tr>
</table>

<hr>
Produzido por Synara Sa Leal e Marcio Alves 

</body>
</html>